﻿<telerik:RadButton x:Class="Rio.Framework.Pages.Workflow.Actions.WorkflowButtonAction"
                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                   xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                   xmlns:conv="clr-namespace:Rio.Framework.Pages.Helpers.Converter"
                   DataContext="{Binding RelativeSource={RelativeSource Self}}"
                   Margin="3"
                   mc:Ignorable="d">

    <telerik:RadButton.Resources>
        <conv:BitmapImageConverter x:Key="BitmapImageConverter" />
    </telerik:RadButton.Resources>

    <Grid x:Name="LayoutRoot">
        <StackPanel HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Orientation="Horizontal"
                    Margin="2">
            <Image Source="{Binding Image, Converter={StaticResource BitmapImageConverter}, Mode=TwoWay}"
                   Width="16"
                   Height="16" />
            <TextBlock TextWrapping="Wrap"
                       Name="ValidateButton"
                       VerticalAlignment="Center"
                       Margin="3,0,0,0"
                       Text="{Binding Text, Mode=TwoWay}" />
        </StackPanel>
    </Grid>
</telerik:RadButton>